package cn.lili.controller.feign.member;

import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.enums.SceneEnums;
import cn.lili.common.vo.PageVO;
import cn.lili.modules.member.client.UserClient;
import cn.lili.modules.member.client.VipClient;
import cn.lili.modules.member.entity.dos.User;
import cn.lili.modules.member.entity.dto.UserInfoDTO;
import cn.lili.modules.member.entity.dto.UserLoginDTO;
import cn.lili.modules.member.entity.dto.UserSearchParams;
import cn.lili.modules.member.entity.vo.UserVO;
import cn.lili.modules.member.service.UserSecurityService;
import cn.lili.modules.member.service.UserService;
import cn.lili.modules.member.service.VipService;
import cn.lili.modules.system.entity.dos.LiVip;
import cn.lili.modules.system.entity.dos.LiVipConfig;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 会员 feign client
 *
 * @author Chopper
 * @version v1.0 2021-11-17 18:06
 */
@RestController
@RequiredArgsConstructor
public class VipFeignController implements VipClient {

    private final VipService vipService;
    @Override
    public LiVip getByUserId(String userId) {
        return vipService.getByUserId(userId);
    }

    @Override
    public boolean update(LiVip liVip) {
        return vipService.updateById(liVip);
    }

    @Override
    public boolean save(LiVip liVip) {
        return vipService.save(liVip);
    }

    @Override
    public void saveVipFlow(String payerId, String paymentMethod, Double price) {
        vipService.saveVipFlow(payerId, paymentMethod, price);
    }
}
